<template>
  <div>
    <van-form @submit="onSubmit">
      <van-field
        v-model="username"
        name="用户名"
        autofocus
        left-icon="friends"
        label="用户名"
        placeholder="用户名"
        :rules="[{ required: true, message: '请填写用户名' }]"
      />
      <van-field
        v-model="password"
        center
        clearable
        left-icon="lock"
        label="密码"
        type="password"
        placeholder="请输入密码"
      >
        <template #button>
          <van-button size="small" plain type="info">忘记密码</van-button>
        </template>
      </van-field>
      <div style="margin: 16px">
        <van-button round block native-type="submit" type="danger"
          >登录</van-button
        >
      </div>
    </van-form>
  </div>
</template>
<script>
export default {
    data () {
        return {
            username:'',
            password:''

        }
    },
    methods: {
        onSubmit(){
            
        }
    }
};
</script>
<style lang="less" scoped>
</style>